// package: rewords-server-2024
// filename: user
// author: diogoxiang@gmail.com
// time: 2024/11/8 11:22

package admin

import (
	"github.com/gogf/gf/v2/frame/g"
	"rewords-server-2024/internal/model/entity"
)

type LoginReq struct {
	g.Meta   `path:"/open/sys/login" method:"post" summary:"admin登录" tags:"用户"`
	UserName string `json:"username" dc:"用户名"`
	Password string `json:"password" dc:"密码"`
}
type LoginRes struct {
	Token               string `json:"token"`
	entity.SysAdminUser `json:"userinfo" dc:"admin用户信息"`
}

type UserInfoReq struct {
	g.Meta `path:"/sys/user/info" method:"get" summary:"获取用户信息" tags:"用户"`
}
type UserInfoRes struct {
	entity.SysAdminUser `json:"userinfo" dc:"admin用户信息"`
}

type CodeLoginReq struct {
	//g.Meta `path:"/ding/code_login" method:"get" tags:"钉钉" summary:"通过钉钉扫码登录"`
	OpenId    string `json:"openId" dc:"openId"`
	UnionId   string `json:"unionId" dc:"unionId"`
	AvatarUrl string `json:"avatarUrl" dc:"头像"`
	Nick      string `json:"nick" dc:"昵称"`
	Email     string `json:"email" dc:"邮箱"`
	Mobile    string `json:"mobile"`
}

type CodeLoginRes struct {
	entity.SysAdminUser `json:"userinfo" dc:"admin用户信息"`
}
